# vim:ts=8 sw=8 noet:
# 
#

CC =	    gcc
CFLAGS =    -g -Wall
LDFLAGS =   

# high-level targets

all:	ngram
clean:
	rm -f $(OBJ)	

clobber: clean
	rm -f ngram

# -- rules

%.o:	%.c
	$(CC) $(CFLAGS) -c -o $@ $<


# -- targets

ngram3.o:  ngram.c ngram.h
	$(CC) $(CFLAGS) -DWIDTH=3 -c -o $@ ngram.c

ngram5.o:  ngram.c ngram.h
	$(CC) $(CFLAGS) -DWIDTH=5 -c -o $@ ngram.c

ngram7.o:  ngram.c ngram.h
	$(CC) $(CFLAGS) -DWIDTH=7 -c -o $@ ngram.c


OBJ =       ngram5.o main.o             
            
ngram:	    $(OBJ)
	    $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIB)

